import request from '@/utils/request';

/**
 * GET 消除门户待办(APP端)
 * @pathParam apiVersion true
 * @queryParam instanceId false
 * @queryParam operatorType true
 * @queryParam projectId false
 * @queryParam todoTypeCode false
 */
export function cleanAppToDoUsingGET({ params, data }) {
  return request('common/cleanAppToDo', {
    method: 'GET',
    params,
    data,
  });
}

/**
 * GET 消除门户待办(PC端)
 * @pathParam apiVersion true
 * @queryParam instanceId false
 * @queryParam operatorType true
 * @queryParam projectId false
 * @queryParam todoTypeCode false
 */
export function cleanPcToDoUsingGET({ params, data }) {
  return request('common/cleanPcToDo', {
    method: 'GET',
    params,
    data,
  });
}

/**
 * GET 清除Redis缓存
 * @pathParam apiVersion true
 * @queryParam key true
 */
export function cleanRedisKeyUsingGET({ params, data }) {
  return request('common/cleanRedisKey', {
    method: 'GET',
    params,
    data,
  });
}

/**
 * GET 删除系统日志
 * @pathParam apiVersion true
 * @queryParam day true
 */
export function cleanSysLogUsingGET({ params, data }) {
  return request('common/cleanSysLog', {
    method: 'GET',
    params,
    data,
  });
}

/**
 * GET 查看门户待办(APP端)
 * @pathParam apiVersion true
 * @queryParam instanceId false
 * @queryParam projectId false
 * @queryParam todoTypeCode false
 */
export function getAppToDoUsingGET({ params, data }) {
  return request('common/getAppToDo', {
    method: 'GET',
    params,
    data,
  });
}

/**
 * GET 查看门户待办(PC端)
 * @pathParam apiVersion true
 * @queryParam instanceId false
 * @queryParam projectId false
 * @queryParam todoTypeCode false
 */
export function getPcToDoUsingGET({ params, data }) {
  return request('common/getPcToDo', {
    method: 'GET',
    params,
    data,
  });
}

/**
 * GET 获取Redis缓存
 * @pathParam apiVersion true
 * @queryParam key true
 */
export function getRedisKeyUsingGET({ params, data }) {
  return request('common/getRedisKey', {
    method: 'GET',
    params,
    data,
  });
}

/**
 * GET 根据组织机构id和岗位组id查询所对应的用户信息
 * @pathParam apiVersion true
 * @queryParam groupId true
 * @queryParam orgdepId true
 */
export function getGroupUserListUsingGET({ params, data }) {
  return request('common/groupUserList', {
    method: 'GET',
    params,
    data,
  });
}

/**
 * GET 根据组织机构id查询所对应的组织机构数据
 * @pathParam apiVersion true
 * @queryParam cityId false
 * @queryParam projectId false
 * @queryParam regionId false
 */
export function getOrgListUsingGET({ params, data }) {
  return request('common/orgList', {
    method: 'GET',
    params,
    data,
  });
}

/**
 * POST 上传信息
 * @pathParam apiVersion true
 * @formDataParam file true
 */
export function uploadFilesUsingPOST({ params, data }) {
  return request('common/uploadFiles', {
    method: 'POST',
    params,
    data,
  });
}

/**
 * GET 查看预警待办(PC端)
 * @pathParam apiVersion true
 * @formDataParam instanceId true
 */
export function commonGetWarnPcToDoGET({ params, data }) {
  return request('common/getWarnPcToDo', {
    method: 'GET',
    params,
    data,
  });
}

/**
 * GET 查看预警督办待办(PC端)
 * @pathParam apiVersion true
 * @formDataParam instanceId true
 */
export function commonGetWarnSupervisePcToDoGET({ params, data }) {
  return request('common/getWarnSupervisePcToDo', {
    method: 'GET',
    params,
    data,
  });
}

/**
 * GET 发送预警督办
 * @pathParam apiVersion true
 * @formDataParam instanceId true
 */
export function commonSendWarnSuperviseGET({ params, data }) {
  return request('common/sendWarnSupervise', {
    method: 'GET',
    params,
    data,
  });
}
